-- GENERATED SPELL FOR [7th Legion Rifleman] --


function spell0_27791(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(62312,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27791', 2266, 1)
end

function spell1_27791(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(50092,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27791', 608, 1)
end

function Sorts_27791(pUnit, Event)
local choix_sorts_27791 = math.random(0, 1)
if choix_sorts_27791 == 0 then
pUnit:RegisterEvent('spell0_27791', 1, 1)
end
if choix_sorts_27791 == 1 then
pUnit:RegisterEvent('spell1_27791', 1, 1)
end
end

function mob27791_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27791', math.random(1500, 3000), 1)
end

function mob27791_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27791_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27791_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27791, 1, 'mob27791_Action')
RegisterUnitEvent(27791, 2, 'mob27791_Leave')
RegisterUnitEvent(27791, 3, 'mob27791_Kill')
RegisterUnitEvent(27791, 4, 'mob27791_Die')
